package task

import (
	"github.com/jinzhu/gorm"
	"kop/modules/conquer/models"
	"time"
)

// 定时删除记录
func Task(dB *gorm.DB) {

	var ticker = time.NewTicker(time.Minute)
	for range ticker.C {

		_ = models.DeleteReports(dB, time.Now().AddDate(0, 0, -2))
	}
}
